@echo off
color 17
Title IPOS Standard IIS 6.0 Configuration . . .
:: ========================================
::	CREATING DIRECTORIES
:: ========================================
:: mkdir D:\logfiles

echo Select your option. . .
echo ------------------------------------------------------------

echo 1=Testfor
echo 2=DDS_Staging
echo 3=OWB
echo 4=Trading_Backoffice
echo 5=Trading_Beanstore
echo 6=Trading_DDS_PreProcessing
echo 7=TrainingStaging_Backoffice
echo 8=TrainingStaging_Beanstore
echo 9=DDSHelper_Staging
echo End
echo ------------------------------------------------------------

:CHOICE2

set /p x=Choose your option[1-9]: 
goto :%x%

goto :end

:: set /P C= Press 1, 2, 3, 4, 5, 6, 7, 8, 9, :

:: DDS, DDS_Staging, OWB, Trading_Backoffice, Trading_Beanstore, Trading_DDS_PreProcessing, TrainingStaging_Backoffice, TrainingStaging_Beanstore, Q to quit /N 
:: [DDS/DDS_Staging/OWB/Trading_Backoffice/Trading_Beanstore/Trading_DDS_PreProcessing/TrainingStaging_Backoffice/TrainingStaging_Beanstore/Q]?

:: if /I %c%==1 goto Testfor
:: if /I %c%==2 goto DDS_Staging
:: if /I %C%==3 goto OWB
:: if /I %C%==4 goto Trading_Backoffice
:: if /I %C%==5 goto Trading_Beanstore
:: if /I %C%==6 goto Trading_DDS_PreProcessing
:: if /I %C%==7 goto TrainingStaging_Backoffice
:: if /I %C%==8 goto TrainingStaging_Beanstore
:: if /I %C%==9 goto END

:1

:: ========================================
::	DECLARING VARIABLES
:: ========================================
SET var=Testfor
SET sdir1=C:\Inetpub\AdminScripts
SET sdir2=%systemroot%\system32
SET dir1=D:\IBM\WebSphere\AppServer\Plugins\bin
SET dir2=D:\IBM\WebSphere\AppServer\Plugins\Config
SET port=9123
::	SET dd=Default.htm
:: ****************************************

:: ========================================
::	CREATING DIRECTORIES
:: ========================================
echo Creating Directoires . . .
echo ------------------------------------------------------------
mkdir D:\logfiles\%var%
mkdir %dir1%\%var%
mkdir %dir2%\%var%
echo.

:: ========================================
::	CREATE APPLICATION POOL
:: ========================================
echo Creating Application Pool . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir1%\adsutil.vbs CREATE w3svc/AppPools/%var% IISApplicationPool
echo.
 
:: ========================================
::	CREATE WEB SITE
:: ========================================
echo Creating Website . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir2%\iisweb.vbs /create "%dir1%\%var%" "%var%" /ap "%var%" /b "%port%"
echo. 

:: ========================================
::	CREATE VIRTUAL DIRECTORY
:: ========================================
echo Creating Virtual Directory . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir2%\IISvdir.vbs /create "%var%" sePlugins "%dir1%\%var%"
echo.
 
:: ========================================
:: 	SET .NET VERSION to 2.0
:: ========================================
::	echo Setting .NET Version . . .
::	echo ------------------------------------------------------------
::	%windir%\Microsoft.Net\Framework\v2.0.50727\aspnet_regiis.exe -s w3svc/1/root/%var%
::	echo.
 
:: ========================================
::	SET DEFAULT DOCUMENT
:: ========================================
::	echo Setting Default Documents . . .
::	echo ------------------------------------------------------------
::	CSCRIPT //nologo %dir%\adsutil.vbs SET w3svc/1/Root/%var%/DefaultDoc %dd%
::	echo.
 
:: ========================================
::	SET IDLE TIMEOUT
:: ========================================
::	echo Setting Idle Timeout . . .
::	echo ------------------------------------------------------------
::	CSCRIPT //nologo %dir%\adsutil.vbs SET w3svc/AppPools/%var%/IdleTimeout %ito%
::	echo.
 
:: ========================================
::	ASSIGN APPLICATION TO VIRDIR
:: ========================================
:: echo Assigning Application Pool to Virtual Directory . . .
:: echo ------------------------------------------------------------
:: CSCRIPT //nologo %dir%\adsutil.vbs SET w3svc/1/Root/%var%/AppPoolid %var%
::	iisweb /create X:\VirtualDir "SiteName" /ap "ApplicationPoolName"
:: echo.
PAUSE
goto End

:2
:: ========================================
::	DECLARING VARIABLES
:: ========================================
SET var=DDS_Staging
SET sdir1=C:\Inetpub\AdminScripts
SET sdir2=%systemroot%\system32
SET dir1=D:\IBM\WebSphere\AppServer\Plugins\bin
SET dir2=D:\IBM\WebSphere\AppServer\Plugins\Config
SET port=9088
::	SET dd=Default.htm
:: ****************************************

:: ========================================
::	CREATING DIRECTORIES
:: ========================================
echo Creating Directoires . . .
echo ------------------------------------------------------------
mkdir D:\logfiles\%var%
mkdir %dir1%\%var%
mkdir %dir2%\%var%
echo.

:: ========================================
::	CREATE APPLICATION POOL
:: ========================================
echo Creating Application Pool . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir1%\adsutil.vbs CREATE w3svc/AppPools/%var% IISApplicationPool
echo.
 
:: ========================================
::	CREATE WEB SITE
:: ========================================
echo Creating Website . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir2%\iisweb.vbs /create "%dir1%\%var%" "%var%" /ap "%var%" /b "%port%"
echo. 

:: ========================================
::	CREATE VIRTUAL DIRECTORY
:: ========================================
echo Creating Virtual Directory . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir2%\IISvdir.vbs /create "%var%" sePlugins "%dir1%\%var%"
echo.

PAUSE
goto End

:3

:: ========================================
::	DECLARING VARIABLES
:: ========================================
SET var=OWBoh
SET sdir1=C:\Inetpub\AdminScripts
SET sdir2=%systemroot%\system32
SET dir1=D:\IBM\WebSphere\AppServer\Plugins\bin
SET dir2=D:\IBM\WebSphere\AppServer\Plugins\Config
SET port=9184
::	SET dd=Default.htm
:: ****************************************

:: ========================================
::	CREATING DIRECTORIES
:: ========================================
echo Creating Directoires . . .
echo ------------------------------------------------------------
mkdir D:\logfiles\%var%
mkdir %dir1%\%var%
mkdir %dir2%\%var%
echo.

:: ========================================
::	CREATE APPLICATION POOL
:: ========================================
echo Creating Application Pool . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir1%\adsutil.vbs CREATE w3svc/AppPools/%var% IISApplicationPool
echo.
 
:: ========================================
::	CREATE WEB SITE
:: ========================================
echo Creating Website . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir2%\iisweb.vbs /create "%dir1%\%var%" "%var%" /ap "%var%" /b "%port%"
echo. 

:: ========================================
::	CREATE VIRTUAL DIRECTORY
:: ========================================
echo Creating Virtual Directory . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir2%\IISvdir.vbs /create "%var%" sePlugins "%dir1%\%var%"
echo.

PAUSE
goto End

:4

:: ========================================
::	DECLARING VARIABLES
:: ========================================
SET var=Trading_Backoffice
SET sdir1=C:\Inetpub\AdminScripts
SET sdir2=%systemroot%\system32
SET dir1=D:\IBM\WebSphere\AppServer\Plugins\bin
SET dir2=D:\IBM\WebSphere\AppServer\Plugins\Config
SET port=9086
::	SET dd=Default.htm
:: ****************************************

:: ========================================
::	CREATING DIRECTORIES
:: ========================================
echo Creating Directoires . . .
echo ------------------------------------------------------------
mkdir D:\logfiles\%var%
mkdir %dir1%\%var%
mkdir %dir2%\%var%
echo.

:: ========================================
::	CREATE APPLICATION POOL
:: ========================================
echo Creating Application Pool . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir1%\adsutil.vbs CREATE w3svc/AppPools/%var% IISApplicationPool
echo.
 
:: ========================================
::	CREATE WEB SITE
:: ========================================
echo Creating Website . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir2%\iisweb.vbs /create "%dir1%\%var%" "%var%" /ap "%var%" /b "%port%"
echo. 

:: ========================================
::	CREATE VIRTUAL DIRECTORY
:: ========================================
echo Creating Virtual Directory . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir2%\IISvdir.vbs /create "%var%" sePlugins "%dir1%\%var%"
echo.

PAUSE
goto End

:5

:: ========================================
::	DECLARING VARIABLES
:: ========================================
SET var=Trading_Beanstore
SET sdir1=C:\Inetpub\AdminScripts
SET sdir2=%systemroot%\system32
SET dir1=D:\IBM\WebSphere\AppServer\Plugins\bin
SET dir2=D:\IBM\WebSphere\AppServer\Plugins\Config
SET port=9080
::	SET dd=Default.htm
:: ****************************************

:: ========================================
::	CREATING DIRECTORIES
:: ========================================
echo Creating Directoires . . .
echo ------------------------------------------------------------
mkdir D:\logfiles\%var%
mkdir %dir1%\%var%
mkdir %dir2%\%var%
echo.

:: ========================================
::	CREATE APPLICATION POOL
:: ========================================
echo Creating Application Pool . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir1%\adsutil.vbs CREATE w3svc/AppPools/%var% IISApplicationPool
echo.
 
:: ========================================
::	CREATE WEB SITE
:: ========================================
echo Creating Website . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir2%\iisweb.vbs /create "%dir1%\%var%" "%var%" /ap "%var%" /b "%port%"
echo. 

:: ========================================
::	CREATE VIRTUAL DIRECTORY
:: ========================================
echo Creating Virtual Directory . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir2%\IISvdir.vbs /create "%var%" sePlugins "%dir1%\%var%"
echo.

PAUSE
goto End

:6

:: ========================================
::	DECLARING VARIABLES
:: ========================================
SET var=Trading_DDS_PreProcessing
SET sdir1=C:\Inetpub\AdminScripts
SET sdir2=%systemroot%\system32
SET dir1=D:\IBM\WebSphere\AppServer\Plugins\bin
SET dir2=D:\IBM\WebSphere\AppServer\Plugins\Config
SET port=9085
::	SET dd=Default.htm
:: ****************************************

:: ========================================
::	CREATING DIRECTORIES
:: ========================================
echo Creating Directoires . . .
echo ------------------------------------------------------------
mkdir D:\logfiles\%var%
mkdir %dir1%\%var%
mkdir %dir2%\%var%
echo.

:: ========================================
::	CREATE APPLICATION POOL
:: ========================================
echo Creating Application Pool . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir1%\adsutil.vbs CREATE w3svc/AppPools/%var% IISApplicationPool
echo.
 
:: ========================================
::	CREATE WEB SITE
:: ========================================
echo Creating Website . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir2%\iisweb.vbs /create "%dir1%\%var%" "%var%" /ap "%var%" /b "%port%"
echo. 

:: ========================================
::	CREATE VIRTUAL DIRECTORY
:: ========================================
echo Creating Virtual Directory . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir2%\IISvdir.vbs /create "%var%" sePlugins "%dir1%\%var%"
echo.

PAUSE
goto End

:7

:: ========================================
::	DECLARING VARIABLES
:: ========================================
SET var=TrainingStaging_Backoffice
SET sdir1=C:\Inetpub\AdminScripts
SET sdir2=%systemroot%\system32
SET dir1=D:\IBM\WebSphere\AppServer\Plugins\bin
SET dir2=D:\IBM\WebSphere\AppServer\Plugins\Config
SET port=9087
::	SET dd=Default.htm
:: ****************************************

:: ========================================
::	CREATING DIRECTORIES
:: ========================================
echo Creating Directoires . . .
echo ------------------------------------------------------------
mkdir D:\logfiles\%var%
mkdir %dir1%\%var%
mkdir %dir2%\%var%
echo.

:: ========================================
::	CREATE APPLICATION POOL
:: ========================================
echo Creating Application Pool . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir1%\adsutil.vbs CREATE w3svc/AppPools/%var% IISApplicationPool
echo.
 
:: ========================================
::	CREATE WEB SITE
:: ========================================
echo Creating Website . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir2%\iisweb.vbs /create "%dir1%\%var%" "%var%" /ap "%var%" /b "%port%"
echo. 

:: ========================================
::	CREATE VIRTUAL DIRECTORY
:: ========================================
echo Creating Virtual Directory . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir2%\IISvdir.vbs /create "%var%" sePlugins "%dir1%\%var%"
echo.

PAUSE
goto End

:8

:: ========================================
::	DECLARING VARIABLES
:: ========================================
SET var=TrainingStaging_Beanstore
SET sdir1=C:\Inetpub\AdminScripts
SET sdir2=%systemroot%\system32
SET dir1=D:\IBM\WebSphere\AppServer\Plugins\bin
SET dir2=D:\IBM\WebSphere\AppServer\Plugins\Config
SET port=9081
::	SET dd=Default.htm
:: ****************************************

:: ========================================
::	CREATING DIRECTORIES
:: ========================================
echo Creating Directoires . . .
echo ------------------------------------------------------------
mkdir D:\logfiles\%var%
mkdir %dir1%\%var%
mkdir %dir2%\%var%
echo.

:: ========================================
::	CREATE APPLICATION POOL
:: ========================================
echo Creating Application Pool . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir1%\adsutil.vbs CREATE w3svc/AppPools/%var% IISApplicationPool
echo.
 
:: ========================================
::	CREATE WEB SITE
:: ========================================
echo Creating Website . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir2%\iisweb.vbs /create "%dir1%\%var%" "%var%" /ap "%var%" /b "%port%"
echo. 

:: ========================================
::	CREATE VIRTUAL DIRECTORY
:: ========================================
echo Creating Virtual Directory . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir2%\IISvdir.vbs /create "%var%" sePlugins "%dir1%\%var%"
echo.

PAUSE
goto End

:9
:: ========================================
::	DECLARING VARIABLES
:: ========================================
SET var=DDSHelper_Staging
SET sdir1=C:\Inetpub\AdminScripts
SET sdir2=%systemroot%\system32
SET dir1=D:\IBM\WebSphere\AppServer\Plugins\bin
SET dir2=D:\IBM\WebSphere\AppServer\Plugins\Config
SET port=9083
::	SET dd=Default.htm
:: ****************************************

:: ========================================
::	CREATING DIRECTORIES
:: ========================================
echo Creating Directoires . . .
echo ------------------------------------------------------------
mkdir D:\logfiles\%var%
mkdir %dir1%\%var%
mkdir %dir2%\%var%
echo.

:: ========================================
::	CREATE APPLICATION POOL
:: ========================================
echo Creating Application Pool . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir1%\adsutil.vbs CREATE w3svc/AppPools/%var% IISApplicationPool
echo.
 
:: ========================================
::	CREATE WEB SITE
:: ========================================
echo Creating Website . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir2%\iisweb.vbs /create "%dir1%\%var%" "%var%" /ap "%var%" /b "%port%"
echo. 

:: ========================================
::	CREATE VIRTUAL DIRECTORY
:: ========================================
echo Creating Virtual Directory . . .
echo ------------------------------------------------------------
CSCRIPT //nologo %sdir2%\IISvdir.vbs /create "%var%" sePlugins "%dir1%\%var%"
echo.

PAUSE
goto End


:END